package ae.pcfc.cldos.online.common.clddb.domain;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;
import org.hibernate.envers.AuditTable;
import org.hibernate.envers.Audited;

import ae.pcfc.cldos.online.common.domain.BaseEntity;


/**
 * The persistent class for the T_CLDOS_PERSONAL_DETAILS database table.
 * 
 */
@Entity
@Table(name="T_CLDOS_EMPLOYMENT_VISA_RENEW")
@Audited
@AuditTable(value="T_CLDOS_EVR_AUD")
public class EmploymentVisaRenew extends BaseEntity implements Serializable {
	private static final long serialVersionUID = 1L;
	
	public static final String EMPLOYEE_ID = "evrEmployeeId";

	@Id
	@GeneratedValue(generator="SQ_CLDOS_APP_ID")
	@GenericGenerator(name = "SQ_CLDOS_APP_ID",  strategy="foreign", parameters=@Parameter(name="property", value="AppMetaData"))
	@Column(name="APPLICATION_ID")
	private Long applicationId;
	
	@Column(name="EVR_EMPLOYEE_ID")
	private String evrEmployeeId;

	@Column(name="EVR_RENEWAL_TYPE")
	private String evrRenewalType;
	
	@Column(name="EVR_MED_LETTER_SUBMISSION")
	private String evrMedLetterSubmission;

	//bi-directional many-to-one association to AppMetaData
	@OneToOne(fetch=FetchType.LAZY, cascade=CascadeType.ALL, optional=true)
	@PrimaryKeyJoinColumn
	private AppMetaData AppMetaData;
	
	public EmploymentVisaRenew() {
		
	}

	public String getEvrEmployeeId() {
		return evrEmployeeId;
	}

	public void setEvrEmployeeId(String evrEmployeeId) {
		this.evrEmployeeId = evrEmployeeId;
	}

	public String getEvrRenewalType() {
		return evrRenewalType;
	}

	public void setEvrRenewalType(String evrRenewalType) {
		this.evrRenewalType = evrRenewalType;
	}

	public String getEvrMedLetterSubmission() {
		return evrMedLetterSubmission;
	}

	public void setEvrMedLetterSubmission(String evrMedLetterSubmission) {
		this.evrMedLetterSubmission = evrMedLetterSubmission;
	}
	public AppMetaData getAppMetaData() {
		return AppMetaData;
	}

	public void setAppMetaData(AppMetaData appMetaData) {
		AppMetaData = appMetaData;
	}

	public Long getApplicationId() {
		return applicationId;
	}

	public void setApplicationId(Long applicationId) {
		this.applicationId = applicationId;
	}

	
	
}